package com.yanxibao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yanxibao.bean.History;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;


/**
 * 历史;(_history)表数据库访问层
 *
 * @author : http://www.chiner.pro
 * @date : 2022-9-25
 */
@Mapper
public interface HistoryMapper extends BaseMapper<History> {

    @Update("update yxb_history h , yxb_userinfo u set h.deleted = 1 , u.historys = u.historys - 1 where h.history_id = #{hId} and u.user_id = #{uId}")
    Integer delById(@Param("hId") Integer hId, @Param("uId") String uId);


}